<?php

	echo "dateStudy页面<br>";
	echo "<br>";
	echo "mktime()获取时间戳<br>";
	echo "mktime() : ".mktime();

	echo "<br>";
	echo "<br>";
	echo "date()格式化时间<br>";
	echo 'date("Y-m-d",mktime()) : '.date("Y-m-d",mktime()).'<br>';
	echo "<br>";
	echo 'date(\'H:i:s\',mktime()) : ' . date('H:i:s',mktime()).'<br>';

	echo "<br>";
	echo "<br>";

	echo "time()获取时间戳<br>";
	echo time();
	echo "date格式化<br>";	
	echo date("Y-m-d",time())."<br>";
	echo date("H:i:s",time())."<br>";
	
	echo "<br>";
	echo "<br>";
	echo "getdate()数组形式获取时间信息<br>";
	print_r(getdate());


	echo "<br>";
	echo "<br>";
	echo "checkdate(int month,int day,int yeah)检查日期的有效性<br>";
	echo var_dump(checkdate(2,30,2008));

	echo "<br>";
	echo date('Y',time());
	echo "<br>";
	echo "<br>";
	echo "strtotime()将字符串转为时间戳<br>";
	echo strtotime("now");
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo microtime();
	echo "<br>";
	//获取微妙时间戳
	function run_time(){
		list($msec,$sec) = explode(" ",microtime());
		$result = (float)$msec + (float)$sec;
		return $result;
	}
	
	echo run_time()."<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
	echo "<br>";
?>